<template>
	<view class="nav">
		<my-topbar @changeActiveIndex="changeActive" :activeIndex="activeIndex" :topbarList="topbarList"
			:bgColor="bgColor" :textColor="textColor" :activeColor="activeColor">
		</my-topbar>
	</view>
</template>

<script>
	import myTopbar from '@/components/common/my-topbar-animation/my-topbar-animation.vue'

	export default {
		props: ['activeIndex'],
		components: {
			myTopbar
		},
		data() {
			return {
				topbarList: [{
					id: 1,
					text: '全部'
				}, {
					id: 2,
					text: '待处理'
				}, {
					id: 3,
					text: '服务中'
				}, {
					id: 4,
					text: '待验收'
				}, {
					id: 5,
					text: '签收/完成'
				}],
				bgColor: '#fff',
				textColor: '#26C55E',
				activeColor: '#26C55E'
			}
		},
		methods: {
			changeActive(id) {
				//console.log(id)
				this.$emit('changeActive', id)
				//this.activeIndex = id
			}
		}
	}
</script>

<style lang="scss" scoped>

</style>